/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.epsi.blokus.tools;



/**
 * Classe org.lwjgl.util.Point améliorée
 * @author julien.lafont
 */
public class Point implements Comparable<Point> {

    private int x;
    private int y;

    public Point() {
    }

    public Point(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }

    public Point alter(int x, int y)
    {
       Point p = new Point();
       p.setX(this.getX()+x);
       p.setY(this.getY()+y);
       return p;
    }


    @Override
    public String toString() {
        return x+","+y;
    }

    public int compareTo(Point o) {
        if (o.getX()==x && o.getY()==y) return 0;
        else return -1;
    }



}
